home *** CD-ROM | disk | FTP | other *** search
- class actionscript.Trail extends MovieClip
- {
- var hAreas;
- var wHitAreaCounter;
- var game;
- function Trail()
- {
- super();
- this._x = 0;
- this._y = 0;
- this.hAreas = 14;
- this.wHitAreaCounter = 1;
- this.game = this._parent;
- var _loc3_ = 1;
- while(_loc3_ <= this.hAreas)
- {
- this["c" + _loc3_]._hit = false;
- this["c" + _loc3_]._visible = false;
- this["h" + _loc3_]._visible = false;
- _loc3_ = _loc3_ + 1;
- }
- }
- function isColliding(mMc)
- {
- if(mMc == undefined)
- {
- return undefined;
- }
- var _loc2_ = 1;
- while(_loc2_ <= this.hAreas)
- {
- if(mMc.hitTest(this["h" + _loc2_]))
- {
- return true;
- }
- _loc2_ = _loc2_ + 1;
- }
- _loc2_ = 1;
- while(_loc2_ < this.wHitAreaCounter)
- {
- if(mMc.hitTest(this["WeaponHitArea" + _loc2_]))
- {
- return true;
- }
- _loc2_ = _loc2_ + 1;
- }
- }
- function attachWeaponHitArea(nX, nY, mW)
- {
- mW._wCounter = this.wHitAreaCounter;
- this.attachMovie("WeaponHitArea","WeaponHitArea" + this.wHitAreaCounter,this.getNextHighestDepth(),{_x:nX,_y:nY,_alpha:0});
- this.wHitAreaCounter = this.wHitAreaCounter + 1;
- }
- function removeWeaponHitAreas()
- {
- var _loc2_ = 1;
- while(_loc2_ <= this.wHitAreaCounter)
- {
- this["WeaponHitArea" + _loc2_].removeMovieClip();
- _loc2_ = _loc2_ + 1;
- }
- this.wHitAreaCounter = 1;
- }
- }
-